Completed bug-fixing and polish,should be ready for pull.