Added Profile Cache and Fixed Several Locking Errors