Fixing minor issues, added pluggable class. Still planning to improve that.