Simplify code a great deal