tweak newlines
initial refactor into multiple files

there is a problem with the default singletons. currently i am requiring
them in the functions that need them but i dont think its clean. i'll
implement getters for it soon