Added top-bottom panel.
Removed repeated code.
Merge pull request #122 from rdavidwu/topPanel

Added top-bottom panel.