Initial code commit

Tested and working so far