Minor fixes and removed useless stuff