Finished implementation of parse. Still need to add some more tests though
More tests for parse and its helper function