Test and Check Style

finished Check style and testing and cleaned up code