Code cleanup
Substituted all parameters with #define
Added more comments