Fixed some errors and removed useless imports