Optimmized code, code clean up.