cleaning up the code; moving methods around; improving implementation; plotting confidences; adding tests (can't find module atm)