Removed unnecessary imports and slightly modified testing code