Linux branch

Edited code, added comments.