Initial code commit. Should be complete except for bugs and enhancements