]> git.mxchange.org Git - flightgear.git/log
flightgear.git
15 years agoRemove stray debug statement.
durk [Sun, 1 Mar 2009 10:18:37 +0000 (10:18 +0000)]
Remove stray debug statement.

15 years agoSome initial code for AI Aircraft making use of SIDs. Current code is a bit
durk [Sun, 1 Mar 2009 09:58:12 +0000 (09:58 +0000)]
Some initial code for AI Aircraft making use of SIDs. Current code is a bit
experimental: Only one SID per runway is supported, and the waypoints are
read from file at every request, which is not very efficient. The current
code is only executed when FlightGear is configured to use airport dynamics
data from the scenery repository, instead of the base package. Since the
latter is still the default, I believe that this will provide enough safe-
guarding to commit SID/STAR support in small, incremental steps.
Next step will be buffering and support for multiple departure routes per
runway.

15 years agoAdded support for <condition> elements under <enable> elements.
torsten [Sat, 28 Feb 2009 20:19:39 +0000 (20:19 +0000)]
Added support for <condition> elements under <enable> elements.
The old <prop> and <value> elements are still supported but ignored, if a <condition> element exists.
Also for the DigitalFilter

15 years agoAdded support for <condition> elements under <enable> elements.
torsten [Sat, 28 Feb 2009 16:16:13 +0000 (16:16 +0000)]
Added support for <condition> elements under <enable> elements.
The old <prop> and <value> elements are still supported but ignored, if a <condition> element exists.

15 years agoRead remote gps messages back and drive panel CDI and to/from flag.
curt [Sat, 28 Feb 2009 16:08:59 +0000 (16:08 +0000)]
Read remote gps messages back and drive panel CDI and to/from flag.

15 years agoUse that static material function instead of the member one.
frohlich [Fri, 27 Feb 2009 19:31:33 +0000 (19:31 +0000)]
Use that static material function instead of the member one.

Modified Files:
  src/FDM/groundcache.cxx src/Scenery/scenery.cxx

15 years ago"min throttle" tunable from Maik:
andy [Tue, 24 Feb 2009 00:16:03 +0000 (00:16 +0000)]
"min throttle" tunable from Maik:

Background are problems modeling the rotax 912 engine. The idle speed
of the real engine is about half of the speed I could achieve with the
default minimum manifold pressure. While on ground I can switch off
the engine by pulling the throttle. The audible difference between the
different minimum idle speed (real vs. simulated) is extreme. With the
patch I get quite realistic sound. For the rotax engine I use
min-throttle="0.05" which is half of the former default value.

15 years agoPatch from Maik: as helijah found out, there was a bug within the rotor simulation.
andy [Mon, 23 Feb 2009 20:17:56 +0000 (20:17 +0000)]
Patch from Maik: as helijah found out, there was a bug within the rotor simulation.

15 years agoUpdate MSVC 7.1 projects - Generate all Release binaries in the same directory
fredb [Sun, 22 Feb 2009 12:03:32 +0000 (12:03 +0000)]
Update MSVC 7.1 projects - Generate all Release binaries in the same directory

15 years agoCompile with VS2005 in debug mode
fredb [Sun, 22 Feb 2009 08:23:11 +0000 (08:23 +0000)]
Compile with VS2005 in debug mode

15 years agoadd /sim/time/real/ (local machine time) analog to /sim/time/utc/
mfranz [Sun, 15 Feb 2009 22:49:51 +0000 (22:49 +0000)]
add /sim/time/real/ (local machine time) analog to /sim/time/utc/

localtime() is once commented out in simgear/io/sg_binobj.cxx and
a warning says the it can screw up sim time. This is only because
localtime() isn't thread-safe (and its thread-safe cousin localtime_r()
isn't portable). As long as all timing is done in the main thread
(which is the case) there should be no problem. Otherwise we'd have
to implement a simple mutex locked wrapper.

15 years agonasal.vim: add getAliasTarget clearValue, values, io.flush
mfranz [Sun, 15 Feb 2009 18:03:20 +0000 (18:03 +0000)]
nasal.vim: add getAliasTarget clearValue, values, io.flush

15 years agoOne step further toward better integration of AI and ATC systems.
durk [Sun, 15 Feb 2009 15:29:56 +0000 (15:29 +0000)]
One step further toward better integration of AI and ATC systems.
 * Changed the runway XX. ATC message to actually report the real
   designated departure runway
 * In case of multiple active runways, select the one with a heading that is
   closest to the direction of the ultimate departure destination / lines up
   with the arrival path.

15 years agoAdding a few more names, as they spring to mind.
durk [Sun, 15 Feb 2009 15:23:43 +0000 (15:23 +0000)]
Adding a few more names, as they spring to mind.

15 years agoMerge branch 'topic/gcintersect' into next
Tim Moore [Sun, 15 Feb 2009 23:16:06 +0000 (00:16 +0100)]
Merge branch 'topic/gcintersect' into next

15 years agoFix off-by-one problem in new ground intersection code
Tim Moore [Sun, 15 Feb 2009 00:55:21 +0000 (01:55 +0100)]
Fix off-by-one problem in new ground intersection code

15 years agoMerge branch 'maint' into next
Tim Moore [Fri, 13 Feb 2009 13:19:42 +0000 (14:19 +0100)]
Merge branch 'maint' into next

15 years agoMerge branch 'topic/tape' into maint
Tim Moore [Fri, 13 Feb 2009 12:44:31 +0000 (13:44 +0100)]
Merge branch 'topic/tape' into maint

15 years agomerging in topic/makej
Tim Moore [Fri, 13 Feb 2009 11:36:06 +0000 (12:36 +0100)]
merging in topic/makej

Merge branch 'topic/makej' into next

* topic/makej:
  get make -j to work

15 years agoget make -j to work
Tim Moore [Fri, 13 Feb 2009 11:33:23 +0000 (12:33 +0100)]
get make -j to work

15 years agoMerge branch 'topic/gcintersect' into next
Tim Moore [Fri, 13 Feb 2009 09:18:42 +0000 (10:18 +0100)]
Merge branch 'topic/gcintersect' into next

15 years agomake resize margin smaller
mfranz [Tue, 10 Feb 2009 22:14:13 +0000 (22:14 +0000)]
make resize margin smaller

15 years agocall puaLargeInput's checkKey() if active (fixes ctrl-c)
mfranz [Tue, 10 Feb 2009 09:46:30 +0000 (09:46 +0000)]
call puaLargeInput's checkKey() if active (fixes ctrl-c)

15 years agoUse OSG polytope intersector to fill ground cache
Tim Moore [Thu, 12 Feb 2009 14:43:05 +0000 (15:43 +0100)]
Use OSG polytope intersector to fill ground cache

This gets rid of a lot of messy code. Although the performance is about
the same as the old code, there is the possibility of a big performance
boost if/when the polytope intersector is taught about KD trees.

15 years agoImprove TerraSync suggested by Alex Perry
fredb [Sun, 8 Feb 2009 09:43:47 +0000 (09:43 +0000)]
Improve TerraSync suggested by Alex Perry

Keep already scheduled tiles for later on relocation

15 years ago- pass return values in set{,Bool,Int,Double}Value() and setprop()
mfranz [Sat, 7 Feb 2009 23:52:12 +0000 (23:52 +0000)]
- pass return values in set{,Bool,Int,Double}Value() and setprop()
- make some char* "const" to silence warnings

This removes the warning that (rarely) occurred if one wrote to a
write protected property with setprop(). While this was a useful
hint, it needlessly floods the terminal if one protected a property
intentionally. (Consider to add an SG_DEBUG warning instead.) It's
now the caller's job to check for the result if it actually cares.

15 years agoSome further work toward adding more AI/ATC messages. This patch provides
durk [Sat, 7 Feb 2009 17:17:07 +0000 (17:17 +0000)]
Some further work toward adding more AI/ATC messages. This patch provides
some prepratory work for assigning different operations to different
frequencies. It also returns a stub for returning an ATIS message ID.
Currently, the ATIC information ID is hardcoded to "Sierra", which needs
to be replaced by a dynamic ID once ATIS services are fully integrated
with the new trafficcontrol code. At least, it's marginally more realistic
then the previous information XX. :-).

15 years agoImprove TerraSync
fredb [Sat, 7 Feb 2009 16:10:48 +0000 (16:10 +0000)]
Improve TerraSync

Really fetch tiles while there are no incoming messages.
Implement an aging mechanism to not try the same tile within a period of 10mn

15 years agoRemove things I didn't do
fredb [Sat, 7 Feb 2009 13:07:28 +0000 (13:07 +0000)]
Remove things I didn't do

15 years agoUpdate to the contributor list
fredb [Sat, 7 Feb 2009 13:02:46 +0000 (13:02 +0000)]
Update to the contributor list

15 years agoUpdated list of contributions / added names of contributers.
durk [Sat, 7 Feb 2009 09:31:08 +0000 (09:31 +0000)]
Updated list of contributions / added names of contributers.

15 years agoBUGFIX: If/else bracket misplacement.
durk [Sat, 7 Feb 2009 09:25:28 +0000 (09:25 +0000)]
BUGFIX: If/else bracket misplacement.

15 years agoSync. w. JSBSim CVS
ehofman [Fri, 6 Feb 2009 19:53:51 +0000 (19:53 +0000)]
Sync. w. JSBSim CVS

15 years agoMerge branch 'topic/tape' into next
Tim Moore [Fri, 6 Feb 2009 14:44:51 +0000 (15:44 +0100)]
Merge branch 'topic/tape' into next

15 years agoHUD::Tape: avoid floating point exception
Tim Moore [Fri, 6 Feb 2009 14:44:07 +0000 (15:44 +0100)]
HUD::Tape: avoid floating point exception

15 years agoMerge branch 'topic/multiplayer' into next
Tim Moore [Fri, 6 Feb 2009 11:18:09 +0000 (12:18 +0100)]
Merge branch 'topic/multiplayer' into next

15 years agoMP cleanup
Tim Moore [Fri, 6 Feb 2009 08:50:47 +0000 (09:50 +0100)]
MP cleanup

Expand the message union to provide member functions that return pointers into
the message buffer.

15 years agoFix various mp bugs.
Tim Moore [Thu, 5 Feb 2009 22:18:26 +0000 (23:18 +0100)]
Fix various mp bugs.

In multiplaymgr.cxx:
The length of a string property that is too big was written out in the message
even though the string was truncated. Also, it was possible to overrun the
message buffer.

In incoming  messages, null-terminate the callsign to prevent any funny
business. Don't believe invalid string lengths. Turn the warning about unknown
properties from a warning into info; there are too many buggy clients out there,
not to mention people who add their own MP properties (hi vivian :)

15 years agoAdd analog output support to the ATC hardware interface.
curt [Wed, 4 Feb 2009 21:11:14 +0000 (21:11 +0000)]
Add analog output support to the ATC hardware interface.

15 years agomake default model configurable (default: Models/Geometry/glider.ac)
mfranz [Tue, 3 Feb 2009 15:52:39 +0000 (15:52 +0000)]
make default model configurable (default: Models/Geometry/glider.ac)
This allows to set Models/Geometry/null.ac or something that doesn't
look bad in multiplayer for both fast and slow speeds, for example
the harrier.

15 years agoAdd some more names / Fix Typos.
durk [Tue, 3 Feb 2009 07:08:43 +0000 (07:08 +0000)]
Add some more names / Fix Typos.

15 years agoAdded Alexis Bory. Alexis, in addition, kindly pointed out a typo in mu
durk [Tue, 3 Feb 2009 05:29:27 +0000 (05:29 +0000)]
Added Alexis Bory. Alexis, in addition, kindly pointed out a typo in mu
own name in the revision note. Thanks.

15 years agoAdd one more name from my list of people who should be listed.
durk [Mon, 2 Feb 2009 18:45:56 +0000 (18:45 +0000)]
Add one more name from my list of people who should be listed.

15 years agoAdd some names that should not have been left out. In general, this
durk [Mon, 2 Feb 2009 06:25:19 +0000 (06:25 +0000)]
Add some names that should not have been left out. In general, this
document needs a fix-up, considering that the date of the last update was
2005.

15 years agoSynchronize version number with our latest release.
durk [Mon, 2 Feb 2009 05:35:52 +0000 (05:35 +0000)]
Synchronize version number with our latest release.

15 years agoMerge branch 'releng/1.9.1' into maint
Tim Moore [Tue, 3 Feb 2009 22:49:14 +0000 (23:49 +0100)]
Merge branch 'releng/1.9.1' into maint

15 years agoconfigure.ac for 1.9.1 release
Tim Moore [Mon, 2 Feb 2009 23:32:05 +0000 (00:32 +0100)]
configure.ac for 1.9.1 release

Note that this commit is not, may never be, in CVS.

15 years agoMerge branch 'maint' into next
Tim Moore [Sun, 1 Feb 2009 23:59:18 +0000 (00:59 +0100)]
Merge branch 'maint' into next

15 years agodo_save: s/reading/writing/ in the error message
mfranz [Sun, 1 Feb 2009 23:44:36 +0000 (23:44 +0000)]
do_save: s/reading/writing/ in the error message

15 years agoChange waitingTiles from std::queue to std::deque
Tim Moore [Sun, 1 Feb 2009 23:38:34 +0000 (00:38 +0100)]
Change waitingTiles from std::queue to std::deque

std::queue can't be cleared portably.

15 years agoImprove the terrasync strategy
fredb [Sun, 1 Feb 2009 19:57:56 +0000 (19:57 +0000)]
Improve the terrasync strategy

15 years agoFix terrasync parsing of atlas messages
fredb [Sun, 1 Feb 2009 18:05:24 +0000 (18:05 +0000)]
Fix terrasync parsing of atlas messages

15 years agox/y/z offsets are in m, not deg
mfranz [Sun, 1 Feb 2009 11:40:03 +0000 (11:40 +0000)]
x/y/z offsets are in m, not deg

15 years agomove <text> before <property> part, so that <format>s are applied initially
mfranz [Sat, 31 Jan 2009 16:30:38 +0000 (16:30 +0000)]
move <text> before <property> part, so that <format>s are applied initially

15 years agoSupport --fg-root in fgjs
fredb [Sat, 31 Jan 2009 09:08:55 +0000 (09:08 +0000)]
Support --fg-root in fgjs

15 years agoBrian Schack: Patch to the atlas protocol that allows nav1 &2 frequencies
durk [Sat, 31 Jan 2009 08:36:11 +0000 (08:36 +0000)]
Brian Schack: Patch to the atlas protocol that allows nav1 &2 frequencies
and radials, as well the selected ADF frequency to be transmitted to Atlas
DT: Two minor modifications to the adf part to make it work, and some
testing.

15 years agoAllow the search of header files in the current directory
fredb [Sat, 31 Jan 2009 08:20:47 +0000 (08:20 +0000)]
Allow the search of header files in the current directory

15 years agoAnd some more cleanup.
durk [Fri, 30 Jan 2009 21:15:48 +0000 (21:15 +0000)]
And some more cleanup.

15 years agoMerge branch 'maint' into next
Tim Moore [Sun, 1 Feb 2009 23:57:24 +0000 (00:57 +0100)]
Merge branch 'maint' into next

15 years agosegfault--
mfranz [Fri, 30 Jan 2009 21:08:45 +0000 (21:08 +0000)]
segfault--

15 years agoCleaning up some unnecessary warnings.
durk [Fri, 30 Jan 2009 20:52:34 +0000 (20:52 +0000)]
Cleaning up some unnecessary warnings.

15 years agoNote to self: Do test compile, even when it's only adding a simple if/else
durk [Fri, 30 Jan 2009 19:05:27 +0000 (19:05 +0000)]
Note to self: Do test compile, even when it's only adding a simple if/else
statement around two existing pieces of code. :-)

15 years agoDevelopment for two new features:
durk [Fri, 30 Jan 2009 18:48:44 +0000 (18:48 +0000)]
Development for two new features:
 * Some support for geometry information provided by the custom scenery
   project. Current support is for AI groundnets and runway use files only
   since this is a switch that involves a lot of data verification and
   updating, during the transistion the actual path where the data can be
   read from is user configurable. setting the property

   /sim/traffic-manager/use-custom-scenery-data to true

  will cause flightgear to read the ground networks from the scenery
  directory (--{fg-scenery}/Airports/[I]/[C]/[A]/[ICAO].groundnet.xml to be
  precise). Setting this property to false will retain the original
  behvior.
* For departing aircraft, runway takeoff calculations will be done on the
  basis of the performance database. For testing purposes, a performance
 estimate for a heavy jet has been added.

15 years agodata hack: escalate some more; this disgusting hack must die *soon*!
mfranz [Fri, 30 Jan 2009 17:55:14 +0000 (17:55 +0000)]
data hack: escalate some more; this disgusting hack must die *soon*!

15 years agoescalate warning for the ugly data hack
mfranz [Fri, 30 Jan 2009 16:19:24 +0000 (16:19 +0000)]
escalate warning for the ugly data hack

15 years agotextbox: add <top-line> param that sets first line (last line if negative)
mfranz [Thu, 29 Jan 2009 18:50:16 +0000 (18:50 +0000)]
textbox: add <top-line> param that sets first line (last line if negative)

15 years agomake use of plib/svn features
mfranz [Thu, 29 Jan 2009 17:48:14 +0000 (17:48 +0000)]
make use of plib/svn features

15 years agoSync. with JSBSim CVS
ehofman [Mon, 26 Jan 2009 20:36:17 +0000 (20:36 +0000)]
Sync. with JSBSim CVS

15 years agoMerge branch 'maint' into next
Tim Moore [Mon, 26 Jan 2009 08:49:07 +0000 (09:49 +0100)]
Merge branch 'maint' into next

15 years agoUpdate MSVC 7.1 projects - Remove pthreads dependency (2)
fredb [Sun, 25 Jan 2009 11:54:30 +0000 (11:54 +0000)]
Update MSVC 7.1 projects - Remove pthreads dependency (2)

15 years agoUpdate MSVC 7.1 projects - Remove pthreads dependency
fredb [Sun, 25 Jan 2009 11:23:22 +0000 (11:23 +0000)]
Update MSVC 7.1 projects - Remove pthreads dependency

15 years agofgPopup::checkHit(): revert r1.103 (consume mouse hits by default)
mfranz [Sat, 24 Jan 2009 23:22:58 +0000 (23:22 +0000)]
fgPopup::checkHit(): revert r1.103 (consume mouse hits by default)

Can't reproduce the problem that r1.103 meant to fix, but it
caused another problem: MMB dragging events weren't passed,
so e.g. power lever control in the bo105 stopped working.

15 years ago_kollsman member not initialized
Tim Moore [Mon, 26 Jan 2009 08:09:08 +0000 (09:09 +0100)]
_kollsman member not initialized

From Csaba Helasz

15 years agodivision-by-zero fix from Csaba Halasz
Tim Moore [Sun, 25 Jan 2009 23:47:09 +0000 (00:47 +0100)]
division-by-zero fix from Csaba Halasz

15 years agoPackaging for the 1.9.1 release
fredb [Sun, 25 Jan 2009 22:30:12 +0000 (22:30 +0000)]
Packaging for the 1.9.1 release

15 years agoUpdate MSVC 7.1 project - AV400Sim added
fredb [Tue, 20 Jan 2009 19:14:43 +0000 (19:14 +0000)]
Update MSVC 7.1 project - AV400Sim added

15 years agoMake newly created (external) boolean properties default to true if not
curt [Tue, 20 Jan 2009 17:46:16 +0000 (17:46 +0000)]
Make newly created (external) boolean properties default to true if not
otherwise specified.

15 years agoAdd an additional option. Work around an inconsistency in hardware design.
curt [Tue, 20 Jan 2009 17:44:26 +0000 (17:44 +0000)]
Add an additional option.  Work around an inconsistency in hardware design.

15 years agoAdd a variant of the ARNAV (AV400) protocol to drive a Garmin 400/430/530
curt [Tue, 20 Jan 2009 17:30:53 +0000 (17:30 +0000)]
Add a variant of the ARNAV (AV400) protocol to drive a Garmin 400/430/530
series GPS from FlightGear.

15 years agoone more PUCLASS exception (not that we used puaScrollBar yet)
mfranz [Tue, 20 Jan 2009 14:23:24 +0000 (14:23 +0000)]
one more PUCLASS exception (not that we used puaScrollBar yet)

15 years agoMerge branch 'maint' into next
Tim Moore [Mon, 19 Jan 2009 20:18:03 +0000 (21:18 +0100)]
Merge branch 'maint' into next

15 years agoFix regression in Vivian's last patch.
Tim Moore [Mon, 19 Jan 2009 20:12:25 +0000 (21:12 +0100)]
Fix regression in Vivian's last patch.

15 years agoMerge branch 'maint' into next
Tim Moore [Sun, 18 Jan 2009 22:22:06 +0000 (23:22 +0100)]
Merge branch 'maint' into next

15 years agodisable dragging margins on non resizable dialogs
mfranz [Sun, 18 Jan 2009 08:27:58 +0000 (08:27 +0000)]
disable dragging margins on non resizable dialogs

15 years ago- ctrl-click in the property browser is for toggling bools, not dragging
mfranz [Sat, 17 Jan 2009 21:05:22 +0000 (21:05 +0000)]
- ctrl-click in the property browser is for toggling bools, not dragging
- add vertical arg to sliders (apparently nobody ever use a vertical one :-)
- simplification

15 years agoMerge branch 'maint' (early part) into next
Tim Moore [Sun, 18 Jan 2009 22:21:11 +0000 (23:21 +0100)]
Merge branch 'maint' (early part) into next

15 years agoDivision by zero fixes from Vivian Meazza.
timoore [Sun, 18 Jan 2009 21:56:55 +0000 (21:56 +0000)]
Division by zero fixes from Vivian Meazza.

15 years agoUpdate MSVC 7.1 project
fredb [Fri, 16 Jan 2009 07:31:01 +0000 (07:31 +0000)]
Update MSVC 7.1 project

15 years agoCsaba/Jester : initialize all per-engine and per-tank attributes ( follow-up )
fredb [Sat, 17 Jan 2009 15:44:13 +0000 (15:44 +0000)]
Csaba/Jester :  initialize all per-engine and per-tank attributes ( follow-up )

15 years agoCsaba/Jester : initialize all per-engine and per-tank attributes
fredb [Sat, 17 Jan 2009 10:05:05 +0000 (10:05 +0000)]
Csaba/Jester :  initialize all per-engine and per-tank attributes

15 years agoMerge branch 'maint' into next
Tim Moore [Thu, 15 Jan 2009 15:16:08 +0000 (16:16 +0100)]
Merge branch 'maint' into next

15 years agoPad T_PositionMsg to a multiple of 8 bytes, and check for messages that aren't.
Tim Moore [Thu, 15 Jan 2009 15:03:34 +0000 (16:03 +0100)]
Pad T_PositionMsg to a multiple of 8 bytes, and check for messages that aren't.

T_PositionMsg had different sizes on 32 and 64 bit systems, which is bad when
a struct is put directly into an network message.

Try to work around this difference in old clients still on the network.

15 years agoFGMultiplayMgr: use binary search to find a property by id
Tim Moore [Thu, 15 Jan 2009 12:05:23 +0000 (13:05 +0100)]
FGMultiplayMgr: use binary search to find a property by id

15 years agoMerge branch 'maint' into next
Tim Moore [Wed, 14 Jan 2009 21:32:52 +0000 (22:32 +0100)]
Merge branch 'maint' into next

15 years agoApply Ron Jensen's fix for Csaba's atan2() fix. Also remove some dead code,
jmt [Wed, 14 Jan 2009 11:18:06 +0000 (11:18 +0000)]
Apply Ron Jensen's fix for Csaba's atan2() fix. Also remove some dead code,
and use SG_NORMALIZE_RANGE.

15 years agoMerge branch 'maint' into next
Tim Moore [Wed, 14 Jan 2009 10:42:26 +0000 (11:42 +0100)]
Merge branch 'maint' into next

15 years agoFGClouds: initialize clouds_3d_enabled in constructor.
Tim Moore [Wed, 14 Jan 2009 10:33:00 +0000 (11:33 +0100)]
FGClouds: initialize clouds_3d_enabled in constructor.

From Csaba Halász

15 years agoHUD::Ladder::draw was capturing the value of a freed temporary
Tim Moore [Wed, 14 Jan 2009 10:22:18 +0000 (11:22 +0100)]
HUD::Ladder::draw was capturing the value of a freed temporary

Fix from Csaba Halász

15 years agoFGEnvironment: fix broken copy constructor.
Tim Moore [Wed, 14 Jan 2009 08:19:41 +0000 (09:19 +0100)]
FGEnvironment: fix broken copy constructor.

Noticed by Csaba Halász.

15 years ago- shift drag for global window dragging (like ctrl for global resizing)
mfranz [Mon, 12 Jan 2009 17:30:58 +0000 (17:30 +0000)]
- shift drag for global window dragging (like ctrl for global resizing)
- cleanup & some coding style unification