04: Pass tests and skeptic

Fix some bugs, add a method to reduce nesting and pass skeptic.