Cleaned up file I/O a bit
Started adding support for weighted edges