Cleaned up prototype4