Fixes to code style and parsing ints