Improved generalisation and correct actor creation

- also included tests