Clean up and rename, fixes for compiling