Coding conventions, removing compilation warnings, consistent usage of const