Visualization Commit 4

Encapsulating Codes in Functions (in progress)