refactored documentation
added getTemplate, getElement
improved tests
changed exception type to OutOfBoundsException of invalid element exception