first commit with basic functionality
significant cleanup and simplification