Move setup panel code to seperate file.