cleaned up some stuff,moved register code to html