Fixed imports and improved testing