got rid of wierd code. fixed a few issues dont know where they came from

got rid of wierd code. fixed a few issues dont know where they came from