Incorporated some enhancements