Draft working compiler

Updated integer checks and global variables generation.