Fixed tests and added sonatype repository to pom