Fixed safety issues with locking API calls.
Removed crash method 4 as this no longer does anything interesting.