add friendly_id, fix bugs, remove unused files