Improved code / Cleanup