Improved testing and fixs some bugs!