layout buttons functionality, adjusting code field size