fixed bugs and removed unused stuff