Rearranged file structure and moved code blocks