Added comments and fileoutputstream stub.