cleanup and added additional methods to core