Restructure & Comment

Code was cleaned up.