Modified global viarables
modified writeshell function
modified global varibles
Add test files
test