[#1522] Faris: Cleaned up the code.