Index: uspace/app/blkdump/blkdump.c
===================================================================
--- uspace/app/blkdump/blkdump.c	(revision 18626b313017dbffad370b7856191b8c62bae88e)
+++ uspace/app/blkdump/blkdump.c	(revision 6a7e497a7d1685485756693cc42f76f38039ad44)
@@ -202,5 +202,5 @@
 	}
 	
-	// Print hexadecimal values
+	/* Print hexadecimal values */
 	for (pos = 0; pos < length; pos++) {
 		if (pos == length/2) {
@@ -210,5 +210,5 @@
 	}
 	
-	// pad with spaces if we have less than 16 bytes
+	/* Pad with spaces if we have less than 16 bytes */
 	for (pos = length; pos < bytes_per_row; pos++) {
 		if (pos == length/2) {
@@ -218,5 +218,5 @@
 	}
 	
-	// Print printable characters
+	/* Print printable characters */
 	for (pos = 0; pos < length; pos++) {
 		if (pos == length/2) {
Index: uspace/app/bnchmark/bnchmark.c
===================================================================
--- uspace/app/bnchmark/bnchmark.c	(revision 18626b313017dbffad370b7856191b8c62bae88e)
+++ uspace/app/bnchmark/bnchmark.c	(revision 6a7e497a7d1685485756693cc42f76f38039ad44)
@@ -210,11 +210,11 @@
 static void syntax_print(void)
 {
-	fprintf(stderr, "syntax: bnchmark <iterations> <test type> <log-str> <path>\n");
-	fprintf(stderr, "  <iterations>    number of times to run a given test");
-	fprintf(stderr, "  <test-type>     one of:");
-	fprintf(stderr, "                    sequential-file-read");
-	fprintf(stderr, "                    sequential-dir-read");
-	fprintf(stderr, "  <log-str>       a string to attach to results");
-	fprintf(stderr, "  <path>          file/directory to use for testing");
+	fprintf(stderr, "syntax: " NAME " <iterations> <test type> <log-str> <path>\n");
+	fprintf(stderr, "  <iterations>    number of times to run a given test\n");
+	fprintf(stderr, "  <test-type>     one of:\n");
+	fprintf(stderr, "                    sequential-file-read\n");
+	fprintf(stderr, "                    sequential-dir-read\n");
+	fprintf(stderr, "  <log-str>       a string to attach to results\n");
+	fprintf(stderr, "  <path>          file/directory to use for testing\n");
 }
 
Index: uspace/app/ext2info/ext2info.c
===================================================================
--- uspace/app/ext2info/ext2info.c	(revision 18626b313017dbffad370b7856191b8c62bae88e)
+++ uspace/app/ext2info/ext2info.c	(revision 6a7e497a7d1685485756693cc42f76f38039ad44)
@@ -95,5 +95,5 @@
 	}
 	
-	// Skip program name
+	/* Skip program name */
 	--argc; ++argv;
 	
@@ -171,5 +171,5 @@
 	assert(argc == 1);
 	
-	// Display common things by default
+	/* Display common things by default */
 	if ((arg_flags & ARG_ALL) == 0) {
 		arg_flags = ARG_COMMON;
Index: uspace/app/testread/testread.c
===================================================================
--- uspace/app/testread/testread.c	(revision 18626b313017dbffad370b7856191b8c62bae88e)
+++ uspace/app/testread/testread.c	(revision 6a7e497a7d1685485756693cc42f76f38039ad44)
@@ -84,5 +84,5 @@
 	}
 	
-	// Skip program name
+	/* Skip program name */
 	--argc; ++argv;
 	
Index: uspace/lib/ext2/libext2_directory.c
===================================================================
--- uspace/lib/ext2/libext2_directory.c	(revision 18626b313017dbffad370b7856191b8c62bae88e)
+++ uspace/lib/ext2/libext2_directory.c	(revision 6a7e497a7d1685485756693cc42f76f38039ad44)
@@ -93,5 +93,5 @@
 	it->fs = fs;
 	
-	// Get the first data block, so we can get first entry
+	/* Get the first data block, so we can get the first entry */
 	rc = ext2_filesystem_get_inode_data_block_index(fs, inode_ref->inode, 0, 
 	    &block_id);
@@ -133,5 +133,5 @@
 	size = ext2_inode_get_size(it->fs->superblock, it->inode_ref->inode);
 	
-	// Are we at the end?
+	/* Are we at the end? */
 	if (it->current_offset + skip >= size) {
 		rc = block_put(it->current_block);
@@ -150,6 +150,7 @@
 	next_block_idx = (it->current_offset + skip) / block_size;
 	
-	// If we are moving accross block boundary,
-	// we need to get another block
+	/* If we are moving accross block boundary,
+	 * we need to get another block
+	 */
 	if (current_block_idx != next_block_idx) {
 		rc = block_put(it->current_block);
@@ -176,5 +177,5 @@
 	offset_in_block = (it->current_offset + skip) % block_size;
 	
-	// Ensure proper alignment
+	/* Ensure proper alignment */
 	if ((offset_in_block % 4) != 0) {
 		it->current = NULL;
@@ -182,5 +183,5 @@
 	}
 	
-	// Ensure that the core of the entry does not overflow the block
+	/* Ensure that the core of the entry does not overflow the block */
 	if (offset_in_block > block_size - 8) {
 		it->current = NULL;
@@ -191,5 +192,5 @@
 	it->current_offset += skip;
 	
-	// Ensure that the whole entry does not overflow the block
+	/* Ensure that the whole entry does not overflow the block */
 	skip = ext2_directory_entry_ll_get_entry_length(it->current);
 	if (offset_in_block + skip > block_size) {
@@ -198,5 +199,5 @@
 	}
 	
-	// Ensure the name length is not too large
+	/* Ensure the name length is not too large */
 	if (ext2_directory_entry_ll_get_name_length(it->fs->superblock, 
 	    it->current) > skip-8) {
Index: uspace/lib/ext2/libext2_filesystem.c
===================================================================
--- uspace/lib/ext2/libext2_filesystem.c	(revision 18626b313017dbffad370b7856191b8c62bae88e)
+++ uspace/lib/ext2/libext2_filesystem.c	(revision 6a7e497a7d1685485756693cc42f76f38039ad44)
@@ -117,8 +117,8 @@
 int ext2_filesystem_check_flags(ext2_filesystem_t *fs, bool *o_read_only)
 {
-	// feature flags are present in rev 1 and later
+	/* feature flags are present in rev 1 and later */
 	if (ext2_superblock_get_rev_major(fs->superblock) == 0) {
 		*o_read_only = false;
-		return 0;
+		return EOK;
 	}
 	
@@ -129,5 +129,7 @@
 	read_only = ext2_superblock_get_features_read_only(fs->superblock);
 	
-	// unset any supported features
+	/* check whether we support all features
+	 * first unset any supported feature flags
+	 * and see whether any unspported feature remains */
 	incompatible &= ~EXT2_SUPPORTED_INCOMPATIBLE_FEATURES;
 	read_only &= ~EXT2_SUPPORTED_READ_ONLY_FEATURES;
@@ -171,8 +173,8 @@
 	    / EXT2_BLOCK_GROUP_DESCRIPTOR_SIZE;
 	
-	// Block group descriptor table starts at the next block after superblock
+	/* Block group descriptor table starts at the next block after superblock */
 	block_id = ext2_superblock_get_first_block(fs->superblock) + 1;
 	
-	// Find the block containing the descriptor we are looking for
+	/* Find the block containing the descriptor we are looking for */
 	block_id += bgid / descriptors_per_block;
 	offset = (bgid % descriptors_per_block) * EXT2_BLOCK_GROUP_DESCRIPTOR_SIZE;
@@ -240,5 +242,7 @@
 	inodes_per_group = ext2_superblock_get_inodes_per_group(fs->superblock);
 	
-	// inode numbers are 1-based
+	/* inode numbers are 1-based, but it is simpler to work with 0-based
+	 * when computing indices
+	 */
 	index -= 1;
 	block_group = index / inodes_per_group;
@@ -269,5 +273,8 @@
 	
 	newref->inode = newref->block->data + offset_in_block;
-	newref->index = index+1; // we decremented index above
+	/* we decremented index above, but need to store the original value
+	 * in the reference
+	 */
+	newref->index = index+1;
 	
 	*ref = newref;
@@ -315,4 +322,5 @@
 	block_t *block;
 	
+	/* Handle simple case when we are dealing with direct reference */ 
 	if (iblock < EXT2_INODE_DIRECT_BLOCKS) {
 		current_block = ext2_inode_get_direct_block(inode, (uint32_t)iblock);
@@ -321,6 +329,7 @@
 	}
 	
-	// Compute limits for indirect block levels
-	// TODO: compute this once when loading filesystem and store in ext2_filesystem_t
+	/* Compute limits for indirect block levels
+	 * TODO: compute this once when loading filesystem and store in ext2_filesystem_t
+	 */
 	block_ids_per_block = ext2_superblock_get_block_size(fs->superblock) / sizeof(uint32_t);
 	limits[0] = EXT2_INODE_DIRECT_BLOCKS;
@@ -332,5 +341,5 @@
 	}
 	
-	// Determine the indirection level needed to get the desired block
+	/* Determine the indirection level needed to get the desired block */
 	level = -1;
 	for (i = 1; i < 4; i++) {
@@ -345,8 +354,12 @@
 	}
 	
+	/* Compute offsets for the topmost level */
 	block_offset_in_level = iblock - limits[level-1];
 	current_block = ext2_inode_get_indirect_block(inode, level-1);
 	offset_in_block = block_offset_in_level / blocks_per_level[level-1];
 	
+	/* Navigate through other levels, until we find the block number
+	 * or find null reference meaning we are dealing with sparse file
+	 */
 	while (level > 0) {
 		rc = block_get(&block, fs->device, current_block, 0);
@@ -364,4 +377,5 @@
 		
 		if (current_block == 0) {
+			/* This is a sparse file */
 			*fblock = 0;
 			return EOK;
@@ -370,8 +384,12 @@
 		level -= 1;
 		
+		/* If we are on the last level, break here as
+		 * there is no next level to visit
+		 */
 		if (level == 0) {
 			break;
 		}
 		
+		/* Visit the next level */
 		block_offset_in_level %= blocks_per_level[level];
 		offset_in_block = block_offset_in_level / blocks_per_level[level-1];
@@ -385,4 +403,7 @@
 /**
  * Allocate a given number of blocks and store their ids in blocks
+ * 
+ * @todo TODO: This function is not finished and really has never been
+ *             used (and tested) yet
  * 
  * @param fs pointer to filesystem
@@ -420,5 +441,5 @@
 	idx = 0;
 	
-	// Read the block group descriptor
+	/* Read the block group descriptor */
 	rc = ext2_filesystem_get_block_group_ref(fs, block_group, &bg);
 	if (rc != EOK) {
@@ -444,5 +465,5 @@
 		}
 		
-		// We found a block group with free block, let's look at the block bitmap
+		/* We found a block group with free block, let's look at the block bitmap */
 		bb_block = ext2_block_group_get_block_bitmap_block(bg->block_group);
 		
@@ -452,5 +473,5 @@
 		}
 		
-		// Use all blocks from this block group
+		/* Use all blocks from this block group */
 		for (bb_idx = 0; bb_idx < block_size && idx < count; bb_idx++) {
 			uint8_t *data = (uint8_t *) block->data;
@@ -458,5 +479,5 @@
 				continue;
 			}
-			// find an empty bit
+			/* find an empty bit */
 			uint8_t mask;
 			for (mask = 1, bb_bit = 0;
Index: uspace/srv/fs/ext2fs/ext2fs.c
===================================================================
--- uspace/srv/fs/ext2fs/ext2fs.c	(revision 18626b313017dbffad370b7856191b8c62bae88e)
+++ uspace/srv/fs/ext2fs/ext2fs.c	(revision 6a7e497a7d1685485756693cc42f76f38039ad44)
@@ -161,4 +161,8 @@
 		
 	rc = fs_register(vfs_phone, &ext2fs_reg, &ext2fs_vfs_info, ext2fs_connection);
+	if (rc != EOK) {
+		fprintf(stdout, NAME ": Failed to register fs (%d)\n", rc);
+		return 1;
+	}
 	
 	printf(NAME ": Accepting connections\n");
Index: uspace/srv/fs/ext2fs/ext2fs_ops.c
===================================================================
--- uspace/srv/fs/ext2fs/ext2fs_ops.c	(revision 18626b313017dbffad370b7856191b8c62bae88e)
+++ uspace/srv/fs/ext2fs/ext2fs_ops.c	(revision 6a7e497a7d1685485756693cc42f76f38039ad44)
@@ -245,6 +245,7 @@
 	}
 
-	// Find length of component in bytes
-	// TODO: check for library function call that does this
+	/* Find length of component in bytes
+	 * TODO: check for library function call that does this
+	 */
 	component_size = 0;
 	while (*(component+component_size) != 0) {
@@ -253,5 +254,5 @@
 	
 	while (it.current != NULL) {
-		// ignore empty directory entries
+		/* ignore empty directory entries */
 		if (it.current->inode != 0) {
 			name_size = ext2_directory_entry_ll_get_name_length(fs->superblock,
@@ -481,5 +482,5 @@
 	}
 	
-	// Find a non-empty directory entry
+	/* Find a non-empty directory entry */
 	while (it.current != NULL) {
 		if (it.current->inode != 0) {
@@ -717,5 +718,5 @@
 	}
 	
-	// Remove the instance from list
+	/* Remove the instance from the list */
 	fibril_mutex_lock(&instance_list_mutex);
 	list_remove(&inst->link);
@@ -787,5 +788,5 @@
 	}
 	else {
-		// Other inode types not supported
+		/* Other inode types not supported */
 		async_answer_0(callid, ENOTSUP);
 		async_answer_0(rid, ENOTSUP);
@@ -828,9 +829,10 @@
 	}
 	
-	// Find the index we want to read
-	// Note that we need to iterate and count as
-	// the underlying structure is a linked list
-	// Moreover, we want to skip . and .. entries
-	// as these are not used in HelenOS
+	/* Find the index we want to read
+	 * Note that we need to iterate and count as
+	 * the underlying structure is a linked list
+	 * Moreover, we want to skip . and .. entries
+	 * as these are not used in HelenOS
+	 */
 	cur = 0;
 	while (it.current != NULL) {
@@ -842,14 +844,15 @@
 			inst->filesystem->superblock, it.current);
 		
-		// skip . and ..
+		/* skip . and .. */
 		if (ext2fs_is_dots(&it.current->name, name_size)) {
 			goto skip;
 		}
 		
-		// Is this the dir entry we want to read?
+		/* Is this the dir entry we want to read? */
 		if (cur == pos) {
-			// The on-disk entry does not contain \0 at the end
-			// end of entry name, so we copy it to new buffer
-			// and add the \0 at the end
+			/* The on-disk entry does not contain \0 at the end
+			 * end of entry name, so we copy it to new buffer
+			 * and add the \0 at the end
+			 */
 			buf = malloc(name_size+1);
 			if (buf == NULL) {
@@ -910,5 +913,5 @@
 	
 	if (pos >= file_size) {
-		// Read 0 bytes successfully
+		/* Read 0 bytes successfully */
 		async_data_read_finalize(callid, NULL, 0);
 		async_answer_1(rid, EOK, 0);
@@ -916,5 +919,5 @@
 	}
 	
-	// For now, we only read data from one block at a time
+	/* For now, we only read data from one block at a time */
 	block_size = ext2_superblock_get_block_size(inst->filesystem->superblock);
 	file_block = pos / block_size;
@@ -922,9 +925,10 @@
 	bytes = min(block_size - offset_in_block, size);
 	
-	// Handle end of file
+	/* Handle end of file */
 	if (pos + bytes > file_size) {
 		bytes = file_size - pos;
 	}
 	
+	/* Get the real block number */
 	rc = ext2_filesystem_get_inode_data_block_index(inst->filesystem,
 		inode_ref->inode, file_block, &fs_block);
@@ -935,8 +939,9 @@
 	}
 	
-	// Check for sparse file
-	// If ext2_filesystem_get_inode_data_block_index returned
-	// fs_block == 0, it means that the given block is not allocated for the 
-	// file and we need to return a buffer of zeros
+	/* Check for sparse file
+	 * If ext2_filesystem_get_inode_data_block_index returned
+	 * fs_block == 0, it means that the given block is not allocated for the 
+	 * file and we need to return a buffer of zeros
+	 */
 	if (fs_block == 0) {
 		buffer = malloc(bytes);
@@ -957,5 +962,5 @@
 	}
 	
-	// Usual case - we need to read a block from device
+	/* Usual case - we need to read a block from device */
 	rc = block_get(&block, inst->devmap_handle, fs_block, BLOCK_FLAGS_NONE);
 	if (rc != EOK) {
