Introduced light as entity

Structure of code changed