remove unused import
remove unused + deprecated functions
fix references