Added tests for Beanstalkd class
Factory pattern for better testing
Refactor of Console class to allow testing