Coding standard, minor bugs fixes, styling layout