Refactored tb usage, application variable injection. Added nightly build setup (WIP)