[Issue #27] Fixed and cleaned up relevant code
Added default configuration. See wiki for description.