Everything should work now. Lot's of error-handling left though