Worked on main logic structure and added a method to query the master
server (untested though).