Adding logic for random platforms, improving general logic