Lots of small tweaks (mostly properties), remove obsolete code