Comments and Console Window

Added comments;
Implemented code to work with Windows