Added define word instruction

Also fixed a few possible problems