Version 2

All codes should be working, just need to double check, clean up, and
write better comments