April2013hackfest

Just a little refactoring and fixing issue #25