Fixed wrong primitive boolean usage and removed an useless class