Made methods public for easier testing with JUnit