rewrote js to be nicer.
deleted unused model file