Initial code commit, still refactoring.