Fixed all errors, now just need to debug