Update Javadocs, clean up some methods, implement some new checks for parameters and so