added update and delete handlers for record resource. code still ugly
Removed some commented code
Moved record struct and associated functions to model package