i have resolved bugs 001 and 003 and have cleaned up code abit