Added some const declarations and made magic numbers and string constants into named statics