Loads of refinements and bug fixes