Removed unused function arguments.
Made parsing code less verbose.