Ready for use.
Optimized mySQL query and cleaned out commented out code.