removed sysouts and fixed warnings