Import prototype

Import files from pre-existing working prototype to be used as initial
skeleton. It needs refactoring and tests