diff --git a/Makefile b/Makefile
index a15af4e..31d3179 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,8 @@ OBJECTS = loader.o framebuffer.o io.o kmain.o
 
 CC = gcc
 CFLAGS = -m32 -nostdlib -nostdinc -fno-builtin -fno-stack-protector \
-		 -nostartfiles -nodefaultlibs -c #-Wall -Wextra -Werror -c
+		 -nostartfiles -nodefaultlibs -Iinclude -Wall -Wextra -Werror -c \
+		 -ansi -pedantic
 
 LDFLAGS = -T link.ld -melf_i386
 
@@ -17,9 +18,15 @@ kernel.elf: $(OBJECTS)
 %.o: %.c
 	$(CC) $(CFLAGS) $< -o $@
 
+%.o: src/%.c
+	$(CC) $(CFLAGS) $< -o $@
+
 %.o: %.s
 	$(AS) $(ASFLAGS) $< -o $@
 
+%.o: src/%.s
+	$(AS) $(ASFLAGS) $< -o $@
+
 os.iso: kernel.elf
 	cp kernel.elf iso/boot/kernel.elf
 	mkisofs -R 							\
diff --git a/framebuffer.h b/include/framebuffer.h
similarity index 100%
rename from framebuffer.h
rename to include/framebuffer.h
diff --git a/io.h b/include/io.h
similarity index 100%
rename from io.h
rename to include/io.h
diff --git a/kmain.c b/kmain.c
index 0112afa..e706548 100644
--- a/kmain.c
+++ b/kmain.c
@@ -1,8 +1,8 @@
 #include "framebuffer.h"
 
-int write(char *buf, unsigned int len)
+unsigned int write(char *buf, unsigned int len)
 {
-  int ret = 0;
+  unsigned int ret = 0;
   int pos = 0;
   fb_move_cursor(ret);
 
diff --git a/framebuffer.c b/src/framebuffer.c
similarity index 100%
rename from framebuffer.c
rename to src/framebuffer.c
diff --git a/io.s b/src/io.s
similarity index 100%
rename from io.s
rename to src/io.s