Fix filename capitalization for unix and a little more code cleanup