Fix build warnings and problems in Eclipse