tidied up layout and fixed interfaces