restructured the code base so it looked much more clean