Simplifications, cleanup and minor fixes