the main parser responsible for all that shit
simple enum with the types
utility functions which are suposed to help
changed a bit