Updated software

Cleaned up software, comments coming soon.