Cleaning code + fix #16