Cleaning script for adding to database