Added header, cleaned up code a little, removed a space between output blocks