Refactored. Many many changes. See README for current info.