Rewrote tube file, added in alarm functionality and state machine, added Makefile