Fixed some more bugs, removed import because unused.