Centered panel and refactored code as per foundation panels.