Clean up and testing implimenatation