Misc. improvements and fixes, optimisation