Minor changes for testing, will comment and tidy code ASAP