Some reafctoring