Cleaning up script to work with server data.