added more changes to streamline appearance

split functions up to make more useable code