improved headers and fixed splint -weak warning