added -ldl to link line, reformatting rules