Remove unused code
Fix top table margin on first load
Cleaned up defines and consts