Code cleanup
Code cleanup
Large rewrite with initial support for left and right panels