Adding separate compile function (WIP)