Fixed a bunch of bugs/variables per feedback.