Initial implementation
moved some files around
basic refactoring
more factoring work