Code Formatting and explicit conversions.
Thanks to André Meier for tremendous work on that.
This commit fixes #1.
Merge branch 'amei_update' into develop