Refactor

Fix #1