Refactored to appserver.io coding standard