Added labels, changed code after feedback, implemented triggers, etc