Initial commit, refactoring prototype