restructured code into larger files

also added new functionality and restrictions upon graph methods