Fix some stupid bug and removed lots of shit