cleanup and fixed dependency problem