Solved some coding problems