levels callback and bugs fixed

leveling functionality implemented and fixed
.idea deleted
Merge