Created modules & several cleanups