Cleaned up. Made it plugin based.