Cleaned Code

I sorted out some useless code and improved the design of it
Now it should work without proplems and as fast as possible at the
moment