Update for 1.5

Updated code for version 1.5, can be bugged.