Refactored a lot from panel to new Actions class