Removed some unused code, fixed some (Eclipse) warnings