Add namespacing

Refactor code to have more specific namespacing and standardize some of
the code conventions