Some refaktoring, added she-bang