clean up code & uppercase layer params