Remove original script and first pass convert to library