Moved most functionality into proper places

And now about to test if the new, more structured ideas, work