Created better gui and handles file choosing