Working Version of Code for Hamlet Hub App