cleaned up code, added handlebar helpers