Updated for 1.6.4 (Some deprecated functions being used, will address at
a later date)