Got most of CAP working. Also, renamed classes to make more sense