moves precompile code into a class so it can be tested and extended