added panel class and cleaned up vars