Initial commit of working implementation