Refactor all the things!

Refactor in different files
Remove UTF BOMs