Code cleanup
Adding build
Separating out utility functions into separate file.