Commit of the actual code for this

This is really old code, please forgive me