a bit of code splitting
moved code into separate directories