Cleaned up package and added new tests