Added scheduler and ability to add a trigger