Fixed indent style and added JSDoc comments