updated to have handlers return values
better tests
added oncePromiseHandler for lazy handlers
added to declaration file
improved comments