Make it work!

Fixed tons of bugs front and back end.