corrected initial configuration
refactored code into separate class
fixed project compilation