continued refactoring of the mapping code
also renamed some constant that didnt follow go convetions