Code tidied; (some) bugs fixed