Cleaned up file stuff a bit