cleaned up some code and trying out some dynamic loading options