code has been formatted
Updated: initial implementation for parsing of Main.