Simplified the form bit a lot, moved other stuff to separate class