Fixed bugs. Working now.