Cleaned up code a bit - use of final , removed some redundant variables