Completely fixed code

Now we fully comply with the specs
Added snazzy header