Simplified structure and added tests and todo