My panel class, requires some cleaning but it works.