Refactor: broke out package functional and added it as a submodule