Removed logging, moved script into separate file