Remove most of the code from AbstractFrame to use the class from Commons library