updated to lates API, use constants, and improved pom