Fixed some JS errors and started work on the views.