MOB-16 Cleaned up code