First bit of functionality.
Removed unused variables.