Cleanup, better code less compiler and findbugs warnings