First commit of major functionality. Should not be considered working