Various fixes, less code

More coming up