Added all functionality to metadata dialog box.

Made several small style fixes.