Removed unused imports
Javadoc improvements
Copy array in method to prevent changes from outside (array won't get stored directly)