Move UI manipluation code into its own file.
Move ajaxy functions into their own file.