stylistic changes, using this instead of Apollo
fixed packaging to include state machine