Clean code up a bit and front end now works