Replaced StringBuffers with StringBuilders
Removed unused import statements
Use String.contains() instead of indexOf() when possible
Foreach loops
Minor code simplifications