Shifted basic script to separate file, add type choosing