cleaned code a bit
changed code
bugfixes