move all internal implementation functions to new file
refactor impl stuff into internals header
whitespace only